#ifndef POSITIONREQUEST_H_
#define POSITIONREQUEST_H_

#include <lbs.h>
#include <lbserrors.h>

class CPositionRequest;

struct MPositionRequestCallback
	{
		virtual void MPositionRequestCallbackRunL(CPositionRequest* aPositionRequest, const TRequestStatus& aStatus, const TPositionInfo& aPositionInfo) = 0;
	};

class CPositionRequest : public CActive
	{
private:
	RPositionServer iServer;
	RPositioner iPositioner;
	TPositionInfo iPositionInfo;
	MPositionRequestCallback* iTarget;
public:
	static CPositionRequest* NewLC();
	static CPositionRequest* NewL();
	RPositioner& Positioner();
	RPositionServer& PositionServer();
	void SetRequestorL(const TDesC& aDesC);
	void OpenL();
	TBool OpenL(TPositionModuleInfo::TTechnologyType aTechnologyType);
	void SetUpdateTimeOutL(TTimeIntervalMicroSeconds aUpdateTimeout);
	void SubmitL(MPositionRequestCallback* aTarget);
	~CPositionRequest();
protected:
	CPositionRequest();
	void ConstructL();
	virtual void DoCancel();
	virtual void RunL();
	};

#endif /* POSITIONREQUEST_H_ */
